package com.test.web.entity;

import org.openqa.selenium.By;
import java.util.HashMap;
import java.util.Map;

public class LoginEntity {
    private boolean codeWork=false;

    private String defaultCode="1111";

    private boolean testIt= false;

    private String rightUser="admin";

    private String rightPwd="123456";

    private static final Map<String, By> steps = new HashMap<String, By>();
    static {
        steps.put("user", By.id("userName"));
        steps.put("pwd", By.id("passWord"));
        steps.put("rand", By.id("rand"));
        steps.put("code", By.id("code"));
        steps.put("btn", By.id("login"));
    }

    public void setUserValue(By by) {
        steps.put("user",by);
    }

    public By getUserValue(){
        return steps.get("user");
    }

    public void setPwdValue(By by) {
        steps.put("pwd",by);
    }

    public By getPwdValue(){
        return steps.get("pwd");
    }

    public void setRandValue(By by) {
        steps.put("rand",by);
    }

    public By getRandValue(){
        return steps.get("user");
    }

    public void setCodeValue(By by) {
        steps.put("code",by);
    }

    public By getCodeValue(){
        return steps.get("user");
    }

    public boolean isCodeWork() {
        return codeWork;
    }

    public void setCodeWork(boolean codeWork) {
        this.codeWork = codeWork;
    }

    public String getDefaultCode() {
        return defaultCode;
    }

    public void setDefaultCode(String defaultCode) {
        this.defaultCode = defaultCode;
    }

    public boolean isTestIt() {
        return testIt;
    }

    public void setTestIt(boolean testIt) {
        this.testIt = testIt;
    }

    public String getRightUser() {
        return rightUser;
    }

    public void setRightUser(String rightUser) {
        this.rightUser = rightUser;
    }

    public String getRightPwd() {
        return rightPwd;
    }

    public void setRightPwd(String rightPwd) {
        this.rightPwd = rightPwd;
    }

}
